<template>
<div>
    <van-cell  is-link  >
        <template #title>
            <span class="custom-title">{{leftTitle}}</span>
            <van-tag type="danger">*</van-tag>
            <input type="text"   class="ipt" :placeholder="placeholder" @input="inputChanged($event)">
        </template>
    </van-cell>
</div>
</template>
<script>
export default {
    name:"",
    components:{},
    data() {
        return {

        }
    },
    props:{
        leftTitle:{
            type:String
        },
        placeholder:{
            type:String
        },
        
    },
    mounted() {
        
    },
    methods: {
         //监听输入框事件
        inputChanged: function($event) {
            this.$emit("inputChanged", $event); //将值放在自定义的事件函数中作为参数
        }
    },
}
</script>
<style  lang="stylus" rel="stylesheet/stylus" scoped >
.van-cell{
  border-bottom 1px solid #ddd
}
.van-tag--danger{
    background-color #fff
    color rgba(253, 63, 63, 1)
  }
  input{
    margin-left 10px
  }
  .ipt{
    float: right;
    // width: 50px;
    width 30px
  }
</style>